package com.example.demo.classes;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("Users")
public class User
{
    @TableId(value = "uid",type = IdType.AUTO)
    private Long uid;//不用long,用Long
    private String uname;
    private String idcard;
    private String uadress;

    public User(String name, String idcard, String uadress)
    {
        this.uname = name;
        this.idcard = idcard;//若中间字母大写,在mapper的sql操作中搜索会自动添加"_",如:idCard -> id_card
        this.uadress = uadress;
    }
    public User(String name)
    {
        this.uname = name;
    }
}
